<ion-view view-title="结算">
  <!--消息提示 begin-->
  <ion-nav-buttons side="right">
    <button class="button button-clear button-outline" ng-click="openMsgModal()">
      <i class="icon ion-ios-chatbubble-outline"></i>
      <i class="crm-message-dot" ng-if="hasMsg"></i>
    </button>
  </ion-nav-buttons>
  <!--消息提示 end-->
  <ion-content class="crm-content" style="padding-top: 0;">
    <div class="crm-main-title">
      <div class="row">
        <div class="col-offset-33 col-33 text-center">
          <h4>账户余额(元)</h4>
        </div>
        <div class="col-33 text-right">
          <!--<button class="button button-outline" style="
            min-width: 40px;
            min-height: 20px;
            line-height: 25px;
            border-color: rgba(255, 255, 255, 0.8);
            color: rgba(255, 255, 255, 0.8);
            margin-top: 10px;
            margin-right: 10px;" ng-click="openCashModal()">提现</button>-->
        </div>
      </div>
      <div class="text-center">
        <h1>{{accountBalance | currency: '￥'}}</h1>
      </div>
      <div class="text-center padding">
        <!--利率: {{rate}}--> &nbsp;
      </div>
    </div>
    <div class="padding">
      <div>账户近期概况</div>
    </div>
    <ion-refresher
            pulling-text="下拉刷新"
            on-refresh="bill.refresh()">
    </ion-refresher>
    <!--
    [{"billTypeName":"旅行社分销","billTypeId":"2","billCost":6.6,"billDate":1455811200000,"orderid":"300","orderStatus":"null"},
    {"billTypeName":"旅行社分销","billTypeId":"2","billCost":1.0,"billDate":1455811200000,"orderid":"311","orderStatus":"null"},{"billTypeName":"采购","billTypeId":"4","billCost":12.6,"billDate":1455811200000,"orderid":"555","orderStatus":"null"},{"billTypeName":"旅行社分销","billTypeId":"2","billCost":4.6,"billDate":1455811200000,"orderid":"313","orderStatus":"null"},{"billTypeName":"洗涤","billTypeId":"3","billCost":12.6,"billDate":1455811200000,"orderid":"2345","orderStatus":"null"},{"billTypeName":"洗涤","billTypeId":"3","billCost":90.09,"billDate":1455811200000,"orderid":"3456","orderStatus":"null"},{"billTypeName":"洗涤","billTypeId":"3","billCost":89.8,"billDate":1455811200000,"orderid":"4567","orderStatus":"null"}]}
    -->
    <div class="crm-card">
      <ul class="list">
        <li class='item item-icon-right crm-hotel-list' style="padding-right: 0;" ng-repeat="bill in bill.data">
          <div class="row row-no-padding">
            <div class="col-33">
              <p>{{bill.billDate | date:'yyyy-MM-dd'}}</p>
            </div>
            <div class="col-33">
              <p>{{bill.billTypeName}}</p>
            </div>
            <div class="col-33">
              <p ng-class="{true: '', false: 'assertive-crm'}[bill.billCost > 0]">&nbsp;{{bill.billCost > 0 ? '+' : ''}}{{bill.billCost | number: 2}}</p>
            </div>
          </div>
          <span class='item-note'>
            <!--<i class="icon ion-chevron-right icon-accessory"></i>-->
          </span>
        </li>
        <li class='item item-text-wrap' ng-if="bill.loaded && bill.data.length==0">
          <p>您至今还没有销售收入，请及时到酒店进行签约。这样可以增加您的收入哦。</p>
        </li>
      </ul>
    </div>
    <ion-infinite-scroll
            ng-if="bill.moreDataCanBeLoaded"
            on-infinite="bill.loadMore()"
            distance="5%"
            spinner="dots"
            immediate-check="false" >
    </ion-infinite-scroll>
  </ion-content>
</ion-view>
